﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:qs="http://schemas.altairis.cz/XML4web/Arguments#QueryString" xmlns:ff="http://schemas.altairis.cz/XML4web/Arguments#FormFields" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" exclude-result-prefixes="msxsl qs ff dc wfw slash ">
    <xsl:output method="xml" indent="yes" omit-xml-declaration="yes" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" encoding="utf-8" />

    <xsl:param name="MyUrl"/>
    <xsl:param name="BaseUrl"/>
    <xsl:param name="qs:css"/>
    <xsl:param name="qs:count" select="99" />

    <xsl:template match="/">
        <html>
            <head>
                <title>MSDN/TechNet</title>
                <xsl:if test="$qs:css != ''">
                    <link rel="stylesheet" type="text/css" href="{$qs:css}"/>
                </xsl:if>
            </head>
            <body>
                <xsl:for-each select="/root/group">
                    <h1 id="group-{@id}">
                        <xsl:value-of select="@title"/>
                    </h1>
                    <xsl:for-each select="feed">
                        <h2 id="feed-{@id}">
                            <xsl:value-of select="@title"/>
                        </h2>
                        <ul>
                            <xsl:for-each select="data/item">
                                <xsl:if test="position() &lt; $qs:count">
                                    <li>
                                        <a href="{link}">
                                            <xsl:value-of select="title"/>
                                        </a>
                                    </li>
                                </xsl:if>
                            </xsl:for-each>
                        </ul>
                    </xsl:for-each>
                </xsl:for-each>
            </body>
        </html>
    </xsl:template>

</xsl:stylesheet>
